package org.budo.redis.jdbc.driver;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.Map;

import org.budo.jdbc.driver.AbstractBudoJdbcDatabaseMetaData;
import org.budo.jdbc.driver.resultset.impl.MapArrayResultSet;
import org.budo.support.lang.util.StringUtil;
import org.budo.support.slf4j.Slf4j;
import org.slf4j.Logger;

/**
 * @author lmw
 */
public class BudoRedisJdbcDatabaseMetaData extends AbstractBudoJdbcDatabaseMetaData {
    private static final Logger log = Slf4j.getLogger();

    @Override
    public ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException {
        log.warn("#21 getTables return null resultSet, catalog=" + catalog //
                + ", schemaPattern=" + schemaPattern //
                + ", tableNamePattern=" + tableNamePattern //
                + ", types=" + StringUtil.join(types));
        return new MapArrayResultSet(new BudoRedisJdbcResultSetMetaData(new String[0]), new Map[0]);
    }
}